{extend name="public/base"}
{block name='main'}
<form class="layui-form layui-form-pane" action="" style="padding:20px;">
  <input type="hidden" name="id" id="id" value="{$info.id|default=''}" />
  <div class="layui-form-item">
    <label class="layui-form-label">用户组名称</label>
    <div class="layui-input-block">
      <input type="text" name="name" id="name" lay-verify="required" placeholder="请输入" class="layui-input" value="{$info.name|default=''}" >
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">所需积分</label>
    <div class="layui-input-block">
      <input type="number" name="score" id="score" lay-verify="score" placeholder="请输入" class="layui-input" value="{$info.score|default='0'}">
    </div>
  </div>
  <div class="layui-form-item"  pane="">
    <label class="layui-form-label">是否启用</label>
    <div class="layui-input-block">
      <input type="radio" title="是" name="status" value="1"  {eq name="$info.status|default='1'" value="1"}checked="checked"{/eq}>
      <input type="radio" title="否" name="status" value="0"  {eq name="$info.status|default=''" value="0"}checked="checked"{/eq}>
    </div>
  </div>
  <div class="layui-form-item"  pane="">
    <label class="layui-form-label">是否管理组</label>
    <div class="layui-input-block">
      <input type="radio" title="是" name="isAdmin" value="1"  {eq name="$info.isAdmin|default='1'" value="1"}checked="checked"{/eq}>
      <input type="radio" title="否" name="isAdmin" value="0"  {eq name="$info.isAdmin|default=''" value="0"}checked="checked"{/eq}>
    </div>
  </div>
  <div class="layui-form-item">
    <label class=""></label>
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit="" lay-filter="content_edit">提交保存</button>
    </div>
  </div>
</form>

<script>
  layui.use(['layer','jquery','form','element','layedit'], function () {

    //参数：layui、名称、更新的formid、更新的url：module/method、更新后跳转的url（为空则不跳转）、编辑器id、标签id（为空则不获取）
    Oper.initUpdate(layui, '导航', 'content_edit', 'user_role/add');
  });
</script>
{/block}